package org.jeecg.modules.FinanceModule.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.FinanceModule.entity.*;
import org.jeecg.modules.zonglzp.entity.User;
import org.jeecg.modules.zonglzp.entity.store;

import java.util.Map;

public interface FinanceService {
    IPage<BusinessWaterEntity> getBusinessWaterlist(Page<BusinessWaterEntity> page, String userId);

    IPage<FinancialWaterEntity> getFinanceWaterlist(Page<FinancialWaterEntity> page, String userId, String date, String starttime, String endttime);


    String getoldmoney(int userId);


    void updateAccountBalance(int userId, String valueOf);


    void insertAddmoneyWater(int userId, String money);

    int rollbackMoney(int userId, int id, String money, int type);

    IPage<CompanyEntity> getcompanyList(Page<CompanyEntity> page, String companyName, String aboutPhone, String realName, int status);

    CompanyEntity getcompanydetail(String companyCode);

    //查询该公司下所有的业务流水
    IPage<BusinessWaterEntity> getCompanyBusinessList(Page<BusinessWaterEntity> page, String companyCode, int isAfter);

    //通过公司编码查询该公司下所有员工
    IPage<User> getcompanystaff(Page<User> page, String companyCode);


    //通过公司id查询
    IPage<store> getcompanystore(Page<store> page, String companyId);

    //通过公司id查询公司品牌标
    IPage<Map<String, Object>> getcompanylabel(Page<Map<String, Object>> page, String companyId);

    //往反冲记录表插入一条数据
    void insertrecoiltable(String userId, int recoilType, String recoilMoney, String factoryResponsibility, String platformResponsibility, String remark);

    //在反冲操作后往财务流水表中插入一条记录
    void insertcaiwuliushuibyfanchon(String userId, String recoilMoney, int recoilType, String remark);

    IPage<InvoiceEntity> getKehukaipiaoList(Page<InvoiceEntity> page, String userId);

    //开票记录页面的公司详情
    CompanyEntity getKehukaipiaoDetail(String userId);

    //通过userId获取开票金额
    String getInvoicedmoneybyuserId(String userId, int i);

    //新增开票记录
    int addInvoice(InvoiceEntity entity);

    //新增对账记录
    int addReconciliationEntity(ReconciliationEntity entity);

    //通过用户id查询他的月结额度
    String getyuejieedubyid(int parseInt);

    //通过用户id查询他的剩余额度
    String getshengyuedu(int parseInt);

    //将用户的剩余额度改为月结额度
    void updateyuejietoshengxu(String yuejieedu, String shengyuedu, int parseInt);

    void updaterealAccountBalance(int parseInt, String valueOf);

    //查询未开票金额
    String getNoEnterMoney(String userId);

    //修改用户的未开票金额
    void updateUserNoEnterMoney(String userId, double v);
}
